<?php

namespace App\Http\Middleware;

use Closure;

class MenuGroup
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  \Closure $next
     * @param   String $menu_group
     * @return mixed
     */
    public function handle($request, Closure $next, $menu_group)
    {
        config(["admin.menu_group" => $menu_group]);
        return $next($request);
    }
}
